package it.hive.model.settings;

import it.hive.io.constants.IO_Constants;
import it.hive.io.settings.Settings;
import it.hive.model.domain.io.DefaultDownloadDirectory;
import it.hive.model.domain.net.InternetProxy;

public class ApplicationSettings extends Settings{
	private InternetProxy proxy;
	private DefaultDownloadDirectory downloadDirectory;

	public ApplicationSettings() {
		super(IO_Constants.DEFAULT_CONF_DIR, IO_Constants.DEFAULT_PROPERTY_FILE);
	}

	public ApplicationSettings(String path, String propertyFileName) {
		super(path,propertyFileName);
	}

	/* ###################################################################################### */
	public InternetProxy getinternetProxy() {
		if (proxy == null) {
			proxy = new InternetProxy();
			caricaImpostazioni(proxy);
		}
		return proxy;
	}

	public DefaultDownloadDirectory getDefaultDownloadDirectory() {
		if (downloadDirectory == null) {
			downloadDirectory = new DefaultDownloadDirectory();
			caricaImpostazioni(downloadDirectory);
		}
		return downloadDirectory;
	}


}
